#!/bin/bash

if [ $UID -ne 0 ];
then
	echo "Run as root"
	exit 1
fi

IFACE=eth0
IP_ADDR=192.168.1.105
SUBNET_MASK=255.255.255.0
GW=192.168.1.1
#HW_ADDR='1C:3G:BF:35:56:D2'

ifconfig $IFACE down

if [[ -n HW_ADDR ]];
then
	echo "Spoofed MAC Address to $HW_ADDR"
fi

ifconfig $IFACE $IP_ADDR netmask $SUBNET_MASK

route add default gw $GW $IFACE
echo "Successfully configured $IFACE"
